package com.javaee.service.admin.impl;

import com.javaee.entity.Mzgh;
import com.javaee.mapper.admin.MzghRepository;
import com.javaee.service.admin.MzghService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.ui.Model;

import java.util.List;

@Service
public class MzghServiceImpl implements MzghService {
    @Autowired
    private MzghRepository mzghRepository;

    @Override
    public int selectCount() {
       return mzghRepository.selectCount();
    }

    public List<Mzgh> findAllMzghByPage(int startIndex, int perPageSize)
    {
        return mzghRepository.findAllMzghByPage(startIndex, perPageSize);
    }
    public  List<Mzgh> search(String mykey){
        return mzghRepository.search(mykey);
    }
}
